package org.idea.iedis.framework.server.datastruct.string;

/**
 * @Author linhao
 * @Date created in 3:44 下午 2021/4/30
 */
class Num {
    public int i;
    public long l;
    public float f;
    public double d;
}

public class Sds {

    private char[] val;

    private Num n;

    private int len;

    public Sds(String value) {
        val = new char[value.length()];
        for (int i = 0; i < val.length; i++) {
            val[i] = value.charAt(i);
        }
        this.len = value.length();
    }

    public Sds(int val) {
        Num n = new Num();
        n.i = val;
        this.n = new Num();
    }

    public Sds(long val) {
        Num n = new Num();
        n.l = val;
        this.n = new Num();
    }

    public Sds(double val) {
        Num n = new Num();
        n.d = val;
        this.n = new Num();
    }

    public Sds(float val) {
        Num n = new Num();
        n.f = val;
        this.n = new Num();
    }

    public int getLen() {
        return len;
    }

    public String getVal(){
        String result = new String(val);
        return result;
    }

    public static void main(String[] args) {
        Sds sds = new Sds("idea123213");
        sds = new Sds(1);
        System.out.println(sds.getLen());
    }
}
